Dynomotion

Group: DynoMotion Message: 12325 From: nkwok Date: 9/27/2015
Subject: Home but Mach3 IsMoving() return true

Hello,


I was using the similar logic from SimpleHome3Axis.c in C Programs directory (XY only).  However, I found that after Homing XY in KFLOP, Mach3's IsMoving() still return true indicating one of the axis is still moving.  How does KFLOP signal to Mach3 that moves are completed?  Thanks!


Regards,

Norman

Group: DynoMotion Message: 12327 From: Tom Kerekes Date: 9/27/2015
Subject: Re: Home but Mach3 IsMoving() return true
Hi Norman,

Mach3 doesn't document well what IsMoving() is based on and seems to vary based on Version.  I haven't heard of any issue regarding this.

If you post your Mach3 Version, KMotion Version, Mach3 XML, Mach3 Home C program, and what you are doing to test IsMoving we can take a look at it.

Regards
TK

Group: DynoMotion Message: 12328 From: Norman Kwok Date: 9/27/2015
Subject: Re: Home but Mach3 IsMoving() return true
Hello Tom,

Thanks again for helping!

Here are the info:

Mach3 Version: Version R3.043.066
KMotion Version: KFLOP 4.32 Build 20:31:12 Apr 12 2014

Mach3 XML: see attachment in zipped file

Mach3 Home C Program: see attachment in zipped file

Mach3 code checking for IsMoving when "Ref All Home" button:

rem Home Y
DoButton( 23 )

rem Home X
DoButton( 22 )

Do While IsMoving()
  rem here is Mach3 stuck here even I got the KFLOP Home C program completed.
  Sleep(100)
Loop



Note: if I moved the "Do While IsMoving()" after DoButton(23), then homing X does not get called in KFLOP Home C Program.



Regards,
Norman



On Sunday, September 27, 2015 12:12 PM, "Tom Kerekes tk@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Hi Norman,

Mach3 doesn't document well what IsMoving() is based on and seems to vary based on Version.  I haven't heard of any issue regarding this.

If you post your Mach3 Version, KMotion Version, Mach3 XML, Mach3 Home C program, and what you are doing to test IsMoving we can take a look at it.

Regards
TK

Group: DynoMotion Message: 12331 From: nkwok Date: 9/30/2015
Subject: Re: Home but Mach3 IsMoving() return true
Tom,

I just wonder if you got a chance to review those info and found why Mach3 thinks the axis is still moving after home?   Thanks again!


Regards,
Norman
Group: DynoMotion Message: 12334 From: Tom Kerekes Date: 10/1/2015
Subject: Re: Home but Mach3 IsMoving() return true
Hi Norman,

Sorry for the delay.  We were able to reproduce the problem with IsMoving() but haven't been able to find what Mach3 is expecting.  To my knowledge Mach3 doesn't document this.

There may be a work around using a Virtual I/O Bit (or KFLOP LED bit 46).  You might clear this at the beginning of any homing and set it when homing of axis X has completed (See attached C Program).

Then in Mach3 Basic loop polling the Input bit instead of IsMoving():

rem Home Y
DoButton( 23 )

rem Home X
DoButton( 22 )

Do While Not IsActive (Input1)
  Sleep(100)
Loop


Here is how to configure the Input1 in Mach3:

Inline image


HTH
Regards
TK

Group: DynoMotion Message: 12341 From: nkwok Date: 10/2/2015
Subject: Re: Home but Mach3 IsMoving() return true
Tom,

Thanks for your help again!  That did the trick!


Regards,
Norman